public class test2 {
    static class MyRunnable implements Runnable{
        @Override
        public void run() {
            try {
                Thread.sleep(1000);
                System.out.println("hello thread");
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }
    }

    public static void main(String[] args) {
        Thread t1=new Thread(new MyRunnable());
        t1.start();
        System.out.println("hello main");

    }


}
